package Builder;

/**
 * @author duanzhizhou
 * @date 2024/10/10
 */
public class ConcreteBuilder extends Builder{
    
    private final Product product = new Product();
    
    @Override
    protected Builder setA(String s) {
        product.setComponentA(s);
        return this;
    }
    
    @Override
    protected Builder setB(String s) {
        product.setComponentB(s);
        return this;
    }
    
    @Override
    protected Builder setC(String s) {
        product.setComponentC(s);
        return this;
    }
    
    @Override
    protected Builder setD(String s) {
        product.setComponentD(s);
        return this;
    }
    
    public Product build() {
        return product;
    }
}
